﻿@model PSTUTemplate.Models.DBObject.Profile
@{
    ViewBag.Title = "Edit";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm("Edit", "Profile", FormMethod.Post,
        new { @encType = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <fieldset>
        <legend>Profile</legend>
        @Html.HiddenFor(model => model.UserId)
        <table cellspacing="20">
            <tr>
                <td>
                    <div class="content">
                        Name :
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Name)
                        @Html.ValidationMessageFor(model => model.Name)
                    </div>
                    <div class="content">
                       Father's Name :
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.FathersName)
                        @Html.ValidationMessageFor(model => model.FathersName)
                    </div>
                    <div class="content">
                        Mother's Name :
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.MothersName)
                        @Html.ValidationMessageFor(model => model.MothersName)
                    </div><br />
                    <div class="content">
                        Permanent Address :<br />
                    </div>
                    <div class="content">
                       Village/Road/Area
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.VillageRoadArea)
                        @Html.ValidationMessageFor(model => model.VillageRoadArea)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.PostOffice)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.PostOffice)
                        @Html.ValidationMessageFor(model => model.PostOffice)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.Thana)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Thana)
                        @Html.ValidationMessageFor(model => model.Thana)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.District)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.District)
                        @Html.ValidationMessageFor(model => model.District)
                    </div>
                </td>
                <td>
                    <img src="@Url.Content("~/Uploads/" + Model.Avatar)"  alt="@Model.Avatar"/  width="200">
                    <br />
                    <label for="file">
                        Filename:</label>
                    <input type="file" name="file" id="file" />
                </td>
            </tr>
            <tr>
                <td>
                    <div class="content">
                        @Html.LabelFor(model => model.Phone)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Phone)
                        @Html.ValidationMessageFor(model => model.Phone)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.Roll)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Roll)<br />
                        @Html.ValidationMessageFor(model => model.Roll)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.RegistrationNo)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.RegistrationNo)
                        @Html.ValidationMessageFor(model => model.RegistrationNo)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.Nationality)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Nationality)
                        @Html.ValidationMessageFor(model => model.Nationality)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.Religion)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Religion)
                        @Html.ValidationMessageFor(model => model.Religion)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.IsTribial)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.IsTribial)
                        @Html.ValidationMessageFor(model => model.IsTribial)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.StartSession)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.StartSession)
                        @Html.ValidationMessageFor(model => model.StartSession)
                    </div>
                </td>
                <td>
                    <div class="content">
                        @Html.LabelFor(model => model.Faculty)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Faculty)
                        @Html.ValidationMessageFor(model => model.Faculty)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.Email)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Email)
                        @Html.ValidationMessageFor(model => model.Email)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.Level)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Level)
                        @Html.ValidationMessageFor(model => model.Level)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.Semester)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.Semester)
                        @Html.ValidationMessageFor(model => model.Semester)
                    </div>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.HallName)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.HallName)
                        @Html.ValidationMessageFor(model => model.HallName)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.HallBorderNo)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.HallBorderNo)
                        @Html.ValidationMessageFor(model => model.HallBorderNo)
                    </div>
                    <div class="content">
                        @Html.LabelFor(model => model.RoomNo)
                    </div>
                    <div class="content">
                        @Html.EditorFor(model => model.RoomNo)
                        @Html.ValidationMessageFor(model => model.RoomNo)
                    </div>
                </td>
            </tr>
        </table>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
